﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace SelfMadeMillionaire.Core.Entities
{
    public class Promotion : BaseEntity
    {
        [DisplayName("Promotion Name")]
        [StringLength(100)]
        public string Name { get; set; }
        
        [DisplayName("Discount")]
        [Range(0, int.MaxValue, ErrorMessage = "Please enter valid integer number")]
        public int Discount { get; set; }

        [DisplayName("Discount Unit:")]
        public bool IsPercent { get; set; }
        
        [DisplayName("Promo Code")]
        [StringLength(100)]
        public string PromoCode { get; set; }

        [DisplayName("Effective Date:")]
        public DateTime EffectiveDate { get; set; }

        [DisplayName("Expiration Date:")]
        public DateTime ExpirationDate { get; set; }

        public int Product { get; set; }

        public string ProductText { get; set; }
        
    }
}
